import { defineStore } from "pinia";

export const useDetailDialogStore = defineStore({
  id: "detailDialog",
  state: (): any => ({
    visible: false,
    dataOne: null
  }),
  getters: {
    getVisible: state => state.visible,
    getDataOne: state => state.dataOne
  },
  actions: {
    openVisible(value: any) {
      this.visible = true;
      this.dataOne = value;
      console.log("this.dataOne is now visible", this.dataOne);
    },
    closeVisible() {
      this.visible = false;
    }
  }
});
